package cn.zch.soft.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.Date;
import java.util.Locale;
/**
 * @author zchcpy
 */
@Controller
public class Index {
  @GetMapping("/")
  public ModelAndView indexPage(Locale locale, Model model) {
    System.out.println(new Date());
    ModelAndView mv = new ModelAndView("main");
    return mv;
  }
  //    @RequestMapping("/error")
  //    public String error(HttpServletRequest request, HttpServletResponse response, Model model) {
  //        System.out.println("error:"+new Date());
  //        return "demo/backup/error";
  //    }
}
